<template>
<a :href="website.url">
    <!-- slot标签接受子节点 -->
    <slot :slotData="website">
        <!-- 默认值显示subtitle,即父组件不传显示subtitle -->
        {{website.subTitle}} 
    </slot>
</a>
</template>
<script>
export default {
    props:['blog'],
    data() {
        return {
            website:{
                url:'https://www.baidu.com/',
                title:'百度',
                subTitle:'搜索引擎'
            }            
        }
    },
}
</script>